{% extends 'layout.html ' %}

{% block content %}

<div>
    <div class="container">
        <div style="margin-bottom: 10px" calss="clearfix">
            <a class="btn btn-primary" href="/hos/add/">添加医院</a>
            <!--查询-->
            <!--            <div style="float:right;width:300px;">-->
            <!--                <form method="get">-->
            <!--                    <div class="input-group">-->
            <!--&lt;!&ndash;                        搜索框&ndash;&gt;-->
            <!--                        <input type="text" name="search" class="form-control" placeholder="Search for..." value="{{ search_data }}">-->
            <!--                        <span class="input-group-btn">-->
            <!--                           <button class="btn btn-default" type="submit">-->
            <!--                               <span class="glyphicon glyphicon-search" aria-hidden="true"></span>-->
            <!--                           </button>-->
            <!--                        </span>-->
            <!--                    </div>-->
            <!--                </form>-->
            <!--            </div>-->

            <div class="panel panel-default">

                <div class="panel-heading">
                    <span class="glyphicon glyphicon-th" aria-hidden="true"></span>
                    医院管理表
                </div>

                <table class="table table-bordered">
                    <thead>
                    <tr>
                        <th>医院编号</th>
                        <th>医院名称</th>
                        <th>所在省份</th>
                        <th>所在城市</th>
                        <th>联系方式</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>

                    {% for obj in queryset %}
                    <tr>
                        <td>{{ obj.hos_id }}</td>
                        <td>{{ obj.hos_name }}</td>
                        <td>{{ obj.hos_province }}</td>
                        <td>{{ obj.hos_city }}</td>
                        <td>{{ obj.hos_email }}</td>

                        <td>
                            <a class="btn btn-success btn-xs" href="/hos/{{ obj.hos_id }}/edit/">编辑</a>
                            <a class="btn btn-danger btn-xs" href="/hos/{{ obj.hos_id }}/delete/">删除</a>
                        </td>
                    </tr>
                    {% endfor %}
                    </tbody>
                </table>
            </div>
            <ul class="pagination">
                {{ page_string }}
            </ul>
        </div>


        {% endblock %}